import sys 
import os 
# 加载项目目录
sys.path.append(os.path.realpath('')) 
from  app.dbhandle import sqlscript
'''
数据格式json 
'''
from  app.dbhandle import dbcon
sqldb = dbcon.SqlLite

def get_blog_url_all(db=sqldb):
    sql = sqlscript.Sql_get_all_blog_url
    data = db.query_sql(sql)
    result = [{"blogapp_name":x[0],"blogapp_url":x[1]} for x in data]
    return result

if __name__ == "__main__":

    # import dbcon
    # sqldb = dbcon.SqlLite
    c = get_blog_url_all()
    print(c)